README

INTRODUCTION
------------
These are a nested heat templates used to deploy vPCRF.
The A level and C level clusters are wrapped as new heat resources.
A level cluster means CMP cluster.
C level cluster means one of MRA, MPE, BOD, MA and MEDIATION clusters.
Abstractly you can deploy any type of vPCRF with these templates.

REQUIREMENTS
------------
Heat service must support template version 2017-02-24 at minimally.

MAIN FILES
----------
resources.env.yaml:
  the environment file which defined customized resource's name
cmp_cluster_primary_site.yaml:
  the template file defines a CMP cluster in primary site.
  Support GEO or HA vPCRF.
cmp_cluster_secondary_site.yaml:
  the template file defines a CMP cluster in secondary site.
  Support GEO vPCRF only.
cluster_primary_site.yaml:
  the template file defines a C level cluster in primary site.
  Support GEO or HA vPCRF. Support MRA, MPE, BOD, MA and MEDIATION clusters.
cluster_secondary_site.yaml:
  the template file defines a C level cluster in secondary site.
  Support GEO vPCRF only. Support MRA, MPE, BOD, MA and MEDIATION clusters.
sub_env_for_test/cmp_cluster_primary_site.env.yaml:
  the environment file, 
  which set parameters' value for cmp_cluster_primary_site.yaml.
sub_env_for_test/mpe_cluster_primary_site.env.yaml:
  the environment file,
  which set parameters' value for cluster_primary_site.yaml.

DEPLOY EXAMPLE
--------------
This is an example to deploy HA vPCRF.
1. Copy this package in host with OpenStack client. And into current directory.
2. Deploy CMP cluster.
  A. Change the parameters' value in 
     sub_env_for_test/cmp_cluster_primary_site.env.yaml.
     You also can add new parameters,
     which are supported in cmp_cluster_primary_site.yaml.
    a. Set nic_amount to select how many networks are used in vPCRF.
       OAM, SIGA, SIGB, SIGC, REP, BKUP are supported
       and will be attached in vPCRF in order.
    b. Set *_network to map vPCRF net and OpenStack net.
    c. Set allocate_*_vip as true if dynamical allocated VIP wanted.
    d. Set *_vip if customized VIP wanted. 
       If setting, related allocate_*_vip be ignored.
    e. Set geo_feature as 0 to choice HA mode. 
	   0 means HA, 1 means GEO. The default value is 0 if no setting.
    f. Set image and flavor.
  B. Source a OpenStack keystone.
  C. Run CMD: openstack stack create -t cmp_cluster_primary_site.yaml \
     -e resources.env.yaml \
     -e sub_env_for_test/cmp_cluster_primary_site.env.yaml <stack_name>
3. Create MPE cluster.
  A. Change the parameters' value in 
     sub_env_for_test/mpe_cluster_primary_site.env.yaml.
     You also can add new parameters,
     which are supported in cluster_primary_site.yaml.
     parameter named app_type is for cluster type setting.
     app_type must be mpe for deplying MPE cluster.
  B. Other operations are like above. CMD is like: openstack stack create \
     -t cluster_primary_site.yaml -e resources.env.yaml \
     -e sub_env_for_test/mpe_cluster_primary_site.env.yaml <stack_name>
4. Create other C Level cluster.
   Use sub_env_for_test/mpe_cluster_primary_site.env.yaml as environment file, 
   and change app_type's value. E.g. set app_type as mra if MRA cluster wanted.
5. View the stacks outputs, 
   and use them to set topology and app configuration manually.

EXTENTION
---------
You can create your own templates based these new heat resources at here.
E.g. you can create template with autoscaling group for C level cluster.

MAINTAINERS
-----------
carl.kan@oracle.com